# -*- coding: utf-8 -*-
from scipy import *
from solve_func import *

class Plate:
	'''
	
	'''
	def __init__(self, beta=1., b=1., M=10, N=10, gamma=0, BC=1, n_modes=6, ds=0):
		self.beta = beta
		self.a = b*beta
		self.b = b
		self.M = M
		self.N = N
		
		self.gamma = gamma
		self.BC = BC
		self.n_modes = n_modes
		self.ds = ds
		#~ self.D = D(E,t,v)
		
	def buckling(self):
		if self.BC=='sim' or self.BC==1:
			self.K,self.A = platebuckling_sim(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
		elif self.BC=='fix' or self.BC==2:
			self.K,self.A = platebuckling_fix(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
		elif self.BC=='simfix' or self.BC==3:
			self.K,self.A = platebuckling_simfix(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
	def bucklingw(self):
		if self.BC=='sim' or self.BC==1:
			self.K,self.A = platebuckling_simw(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
		elif self.BC=='fix' or self.BC==2:
			self.K,self.A = platebuckling_fixw(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
		elif self.BC=='simfix' or self.BC==3:
			self.K,self.A = platebuckling_simfixw(
						self.M, self.N,
						self.beta, self.gamma,
						self.n_modes, self.ds )
	